package com.yoomiito.app.base;


import cn.droidlover.xdroidmvp.mvp.IView;
import cn.droidlover.xdroidmvp.mvp.XPresent;
import cn.droidlover.xdroidmvp.net.ApiException;
import cn.droidlover.xdroidmvp.net.BaseModel;
import io.reactivex.Flowable;
import io.reactivex.FlowableTransformer;
import io.reactivex.functions.Consumer;

public abstract class BasePresenter<V extends IView> extends XPresent<V> {

    public AppConfig mAppConfig;

    public BasePresenter(AppConfig appConfig) {
        mAppConfig = appConfig;
    }

    private final Consumer<ApiException> handleError = e -> {
        if (getV()!=null){
            getV().handleError(e);
        }
    };

    public Consumer<ApiException> handleException(){
        return handleError;
    }

}
